package com.staplehurst.aws.sdb;

import java.util.HashMap;


public class DBRecord {
		
        public final String REC_ID = "REC_ID";
        public final String APP_NAME = "APP_NAME";
        public final String DATE = "DATE";
        public final String MAKE = "MAKE";
        public final String MODEL = "MODEL";
        public final String API_LEVEL = "API_LEVEL";
        public final String ACTIVITY_TYPE = "ACTIVITY_TYPE";
        public final String TOTAL_MEM = "TOTAL_MEM";
        public final String FREE_MEM = "FREE_MEM";
        public final String DURATION = "DURATION";
        public final String CRASH_LOG = "CRASH_LOG";
        public final String DB_BYTES = "DB_BYTES";
		
		private String mRecId;
		private String mAppName;
		private String mDate;
		private String mMake;
		private String mModel;
		private String mAPILevel;
		private String mActivityType;
		private String mTotalMem;
		private String mFreeMem;
		private String mDuration;
		private String mCrashLog;
		private String mDbBytes;
		
		public HashMap<String,String> createAWSRecord (DBRecord dbrecord) {
			
			HashMap<String,String> awsRecord = new HashMap<String,String>();
			awsRecord.put(dbrecord.REC_ID, dbrecord.getmRecId());
			awsRecord.put(dbrecord.APP_NAME, dbrecord.getmAppName());
			awsRecord.put(dbrecord.DATE, dbrecord.getmDate());
			awsRecord.put(dbrecord.MAKE, dbrecord.getmMake());
			awsRecord.put(dbrecord.MODEL, dbrecord.getmModel());
			awsRecord.put(dbrecord.API_LEVEL, dbrecord.getmAPILevel());
			awsRecord.put(dbrecord.ACTIVITY_TYPE, dbrecord.getmActivityType());
			awsRecord.put(dbrecord.TOTAL_MEM, dbrecord.getmTotalMem());
			awsRecord.put(dbrecord.FREE_MEM, dbrecord.getmFreeMem());
			awsRecord.put(dbrecord.DURATION, dbrecord.getmDuration());
			awsRecord.put(dbrecord.CRASH_LOG, dbrecord.getmCrashLog());
			awsRecord.put(dbrecord.DB_BYTES, dbrecord.getmDbBytes());
			
			return awsRecord;
		}
		
		public DBRecord (String recid) {			
			this.mRecId = recid;			
		}
		
		public DBRecord (String recid, String app_name, String date, String make, String model, String apilevel, String activitytype,
				String totalmem, String freemem, String duration, String crashlog, String dbbytes) {
			
			this.mRecId = recid;
			this.mAppName = app_name;
			this.mDate = date;
			this.mMake = make;
			this.mModel = model;
			this.mAPILevel = apilevel;
			this.mActivityType = activitytype;
			this.mTotalMem = totalmem;
			this.mFreeMem = freemem;
			this.mDuration = duration;
			this.mCrashLog = crashlog;
			this.mDbBytes = dbbytes;
			
		}

		public String getmRecId() {
			return mRecId;
		}

		public void setmRecId(String mRecId) {
			this.mRecId = mRecId;
		}
		
		public String getmAppName() {
			return mAppName;
		}

		public void setmAppName(String mAppName) {
			this.mAppName = mAppName;
		}

		public String getmDate() {
			return mDate;
		}

		public void setmDate(String mDate) {
			this.mDate = mDate;
		}

		public String getmMake() {
			return mMake;
		}

		public void setmMake(String mMake) {
			this.mMake = mMake;
		}

		public String getmModel() {
			return mModel;
		}

		public void setmModel(String mModel) {
			this.mModel = mModel;
		}

		public String getmAPILevel() {
			return mAPILevel;
		}

		public void setmAPILevel(String mAPILevel) {
			this.mAPILevel = mAPILevel;
		}

		public String getmActivityType() {
			return mActivityType;
		}	
		
		public String getmTotalMem() {
			return mTotalMem;
		}

		public void setmTotalMem(String mTotalMem) {
			this.mTotalMem = mTotalMem;
		}

		public String getmFreeMem() {
			return mFreeMem;
		}

		public void setmFreeMem(String mFreeMem) {
			this.mFreeMem = mFreeMem;
		}

		public void setmActivityType(String mActivityType) {
			this.mActivityType = mActivityType;
		}

		public String getmDuration() {
			return mDuration;
		}

		public void setmDuration(String mDuration) {
			this.mDuration = mDuration;
		}

		public String getmCrashLog() {
			return mCrashLog;
		}

		public void setmCrashLog(String mCrashLog) {
			this.mCrashLog = mCrashLog;
		}			
		
		public String getmDbBytes() {
			return mDbBytes;
		}

		public void setmDbBytes(String mDbBytes) {
			this.mDbBytes = mDbBytes;
		}
		
	}
	